﻿using System.Windows;
using Columbus;

namespace HelloColumbusApplication.MessageBoxFeature
{
    public class MessageBoxController : Controller
    {
        public ActionResult OkCancelChoice()
        {
            return MessageBox("Do you want to do something?", "Example", MessageBoxButton.OKCancel, ChoiceResult);
        }

        public void ChoiceResult(MessageBoxResult obj)
        {
            if (obj == MessageBoxResult.OK)
                NavigationContext.Navigator.NavigateTo<MessageBoxController>(c => c.OkPage());
        }

        public ActionResult OkPage()
        {
            return Page();
        }
    }
}
